package cn.xu.liteflow.components;

import com.yomahub.liteflow.core.NodeComponent;
import org.springframework.stereotype.Component;

/**
 * @Author xuguofei clark2021@qq.com || WX clark_2023
 * @Date 2024/3/5
 * @Desc TODO
 **/
@Component("bContext")
public class BContextCmp extends NodeComponent {

    @Override
    public void process() throws InterruptedException {
        Thread.sleep(2000);
        //do your business
        System.out.println("bContext-------------------hell world");
        Order order = this.getContextBean(Order.class);
        System.out.println("order----->"+order);
        if(order.getConcurrent().addAndGet(1)==1){
            order.setMoney(10);
            order.setAddr("上海市青浦区蟠龙天地666");
        }
        order.setPayStatus("pay");
    }

}
